﻿using System;
using System.Collections;

namespace YAMM.PlugIn
{
    /// <summary>
    /// Defines methods for <see cref="IToolStripMenu"/> collections.
    /// </summary>
    public interface IToolStripMenuCollection
    {
        #region Add
        /// <summary>
        /// Adds the context menu.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="name">The name.</param>
        /// <returns>The new context menu.</returns>
        IToolStripMenu AddContextMenu(Guid identifier, string name);
        /// <summary>
        /// Adds the menu bar.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="name">The name.</param>
        /// <returns>The new menu bar.</returns>
        IToolStripMenu AddMenuBar(Guid identifier, string name);
        /// <summary>
        /// Adds the tool bar.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="name">The name.</param>
        /// <returns>The new tool bar.</returns>
        IToolStripMenu AddToolBar(Guid identifier, string name);
        #endregion

        /// <summary>
        /// Determines whether YAMM.PlugIn.IToolStripMenuCollection contains a specific IToolStripMenu.
        /// </summary>
        /// <param name="identifier">The identifier of a specific menu.</param>
        /// <returns>
        /// 	<c>true</c> if YAMM.PlugIn.IToolStripMenuCollection contains the specified menu with this identifier; otherwise, <c>false</c>.
        /// </returns>
        bool Contains(Guid identifier);

        /// <summary>
        /// Removes the specified menu with this identifier.
        /// </summary>
        /// <param name="identifier">The identifier of a specified menu.</param>
        void Remove(Guid identifier);

        /// <summary>
        /// Gets the number of elements contained in the YAMM.PlugIn.IToolStripMenuCollection.
        /// </summary>
        /// <value>The number of elements contained in the YAMM.PlugIn.IToolStripMenuCollection.</value>
        int Count { get; }

        /// <summary>
        /// Gets the <see cref="YAMM.PlugIn.IToolStripMenu"/> with the specified identifier.
        /// </summary>
        /// <value>The menu with the specified identifier.</value>
        IToolStripMenu this[Guid identifier] { get; }        
    }
}
